<!DOCTYPE html>
<html>

<head lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="description" content="58新媒体">
    <meta name="keywords" content="58新媒体"/>
    <title>58新媒体-查看订单</title>
    <link href="../images/web.ico" rel="icon">
    <link href="../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../lib/bootstrap/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="../css/style.css" rel="stylesheet">
    <link href="../css/animate.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../css/sweetalert.css">
    <link href="../plugins/validator/css/bootstrapValidator.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../plugins/validator/css/bootstrap-datetimepicker.min.css"/>
    <!---让IE9以下浏览器支持响应式布局---->
    <!--[if lt IE 9]>
    <script src="../plugins/ie/html5shiv-3.7.0.js"></script>
    <script src="../plugins/ie/respond-1.3.0.min.js"></script>
    <![endif]-->
</head>

<body>
<!--加载--->
<div class="loading-container">
    <div class="sk-spinner sk-spinner-wave">
        <div class="sk-rect1"></div>
        <!--此注释用于消除‘display: inline-block;’布局下标签自动生成的空白边距，请勿删除
    -->
        <div class="sk-rect2"></div>
        <!--
    -->
        <div class="sk-rect3"></div>
        <!--
    -->
        <div class="sk-rect4"></div>
        <!--
    -->
        <div class="sk-rect5"></div>
    </div>
</div>
<!--导航-->
<div class="navbar navbar-inner">
    <div class="container-fluid">
        <div class="">
            <a class="navbar-header pull-left logo" href="../../index.html">
                58新媒体管理平台
            </a>
            <div class="sidebar-collaps" id="sidebar-collapse" style="display: inline-block">
                <i class="collapse-icon glyphicon glyphicon-align-justify"></i>
            </div>
            <ul class="nav navbar-nav navbar-right navbar-custom-menu">
                <li class="dropdown messages-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false"><img src="https://srhub.oss-cn-hangzhou.aliyuncs.com/dinghaolaidanga/img/logo-1.png" class="user-img"><span
                            class="hedden-xs"> 欢迎您，<span id="name">--</span></span></a>
                    <ul class="dropdown-menu user-box">
                        <li class="user-header">
                            <img src="https://srhub.oss-cn-hangzhou.aliyuncs.com/dinghaolaidanga/img/logo-1.png" class="img-circle" height="90">
                            <!--<p>WenQian-Web前端开发者<small>2014/04-至今</small></p>-->
                        </li>
                        <li class="user-footer">
                            <div class="pull-right">
                                <a class="btn btn-default" href="../html/login.html">退出</a>
                            </div>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</div>

<!--主体-->
<div class="main-container container-fluid">
    <div class="page-container" style="">
        <div class="page-sidebar">
            <div class="sidebar-header-wrapper">
                <div class="form-group has-group has-transparent">
                    <input type="text" class="form-control searchinput">
                    <div class="searchhelper">搜索报告、图表、电子邮件或通知</div>
                    <span class="fa fa-search has-group-feedback"></span>
                </div>
            </div>
            <ul class="nav sidebar-menu" id="qqqqqq">
                <li class="">
                    <a href="index.html">
                        <i class="glyphicon glyphicon-home menu-icon"></i>
                        <span class="menu-text"> 首页 </span>
                    </a>
                </li>
                <li class="active">
                    <a href="member.html">
                        <i class="glyphicon menu-icon fa fa-user-circle"></i>
                        <span class="menu-text"> 用户管理 </span>
                    </a>
                </li>
                <li>
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-newspaper-o"></i>
                        <span class="menu-text"> 新闻中心 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="news-classification.html">
                                <span class="menu-text">新闻分类</span>
                            </a>
                        </li>
                        <li>
                            <a href="news.html">
                                <span class="menu-text">新闻中心</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="">
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-video-camera"></i>
                        <span class="menu-text"> 视频中心 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li class="">
                            <a href="video-classification.html">
                                <span class="menu-text">视频分类</span>
                            </a>
                        </li>
                        <li class="">
                            <a href="video.html">
                                <span class="menu-text">视频中心</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-shopping-cart"></i>
                        <span class="menu-text"> 商品中心 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="shop-classification.html">
                                <span class="menu-text">商品分类</span>
                            </a>
                        </li>
                        <li>
                            <a href="shop.html">
                                <span class="menu-text">商品列表</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="forward.html">
                        <i class="glyphicon menu-icon fa fa-file-text-o"></i>
                        <span class="menu-text"> 提现打款 </span>
                    </a>
                </li>
                <li class="">
                    <a href="transfer.html">
                        <i class="glyphicon menu-icon fa fa-file-text-o"></i>
                        <span class="menu-text"> 转账 </span>
                    </a>
                </li>
                <li>
                    <a href="order.html">
                        <i class="glyphicon menu-icon fa fa-server menu-icon"></i>
                        <span class="menu-text"> 订单管理 </span>
                    </a>
                </li>
                <li>
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-calendar-minus-o"></i>
                        <span class="menu-text"> 任务管理 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="taskType.html">
                                <span class="menu-text">任务类型</span>
                            </a>
                        </li>
                        <li>
                            <a href="taskScreenshots.html">
                                <span class="menu-text">任务截图</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="">
                    <a href="#" class="menu-dropdown">
                        <i class="glyphicon menu-icon fa fa-window-restore"></i>
                        <span class="menu-text"> 套餐 </span>
                        <i class="fa fa-angle-left menu-expand"></i>
                    </a>
                    <ul class="submenu">
                        <li class="">
                            <a href="meal-list.html">
                                <span class="menu-text">套餐列表</span>
                            </a>
                        </li>
                        <li class="">
                            <a href="meal-detailed.html">
                                <span class="menu-text">套餐明细</span>
                            </a>
                        </li>
                        <li class="">
                            <a href="meal-run.html">
                                <span class="menu-text">套餐管理</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="signIn.html">
                        <i class="glyphicon menu-icon fa fa-map-marker"></i>
                        <span class="menu-text"> 签到明细 </span>
                    </a>
                </li>
                <li>
                    <a href="read.html">
                        <i class="glyphicon menu-icon fa fa-book"></i>
                        <span class="menu-text"> 阅读赚钱明细 </span>
                    </a>
                </li>
                <li>
                    <a href="distribution-commission.html">
                        <i class="glyphicon menu-icon fa fa-mail-forward"></i>
                        <span class="menu-text"> 分销佣金明细 </span>
                    </a>
                </li>
                <li class="">
                    <a href="InvitationToEarn.html">
                        <i class="glyphicon menu-icon fa fa-id-badge"></i>
                        <span class="menu-text"> 邀请赚取 </span>
                    </a>
                </li>
                <li class="">
                    <a href="notice.html">
                        <i class="glyphicon menu-icon fa fa-bullhorn menu-icon"></i>
                        <span class="menu-text"> 系统公告 </span>
                    </a>
                </li>
                <li class="">
                    <a href="store-detailed.html">
                        <i class="glyphicon menu-icon fa fa-mail-forward"></i>
                        <span class="menu-text"> 商城分销明细 </span>
                    </a>
                </li>
                <!--<li class="">
                    <a href="quotaDetails.html">
                        <i class="glyphicon menu-icon fa fa-sort-amount-desc"></i>
                        <span class="menu-text"> 额度明细 </span>
                    </a>
                </li>-->
            </ul>
            </ul>
        </div>

        <!---page-sidebar--->

        <div class="page-wrapper">
            <div class="page-breadcrumbs">
                <ol class="breadcrumb">
                    <li><i class="fa fa-home"></i>
                        <a href="index.html">首页</a>
                    </li>
                    <li>查看订单</li>
                </ol>
            </div>
            <div class="page-header position-relative">
                <div class="header-title title-h1">查看订单</div>
            </div>

            <div class="page-body">
                <!--基本表单--->
                <div class="row">
                    <!--基本表单--->
                    <div class="col-lg-12">
                        <div class="widget">
                            <div class="widget-header">
                                <div class="widget-caption">查看订单</div>
                            </div>
                            <div class="widget-body">
                                <form id="defaultForm" method="post" class="form-horizontal" action="">
                                    <input type="hidden" name="userId" id="id"/>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">昵称:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="userName" id="userName" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">手机号:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="account" id="account" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">上级邀请人:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="userName1" id="userName1" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">上级手机号:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="account1" id="account1" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">性别:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="sex" id="sex" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">阅读宝:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="balance" id="balance" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">余额:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="commission" id="commission" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">国家:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="country" id="country" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">省份:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="province" id="province" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">城市:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="city" id="city" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">邀请码:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="invitationCode" id="invitationCode" readonly/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">是否为会员:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="member" readonly id="member" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">商城会员等级:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="mallGrade" readonly id="mallGrade" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">加入时间:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="time" readonly id="time" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-3 control-label">状态:<i class="red">*</i></label>
                                        <div class="col-lg-5">
                                            <input type="text" class="form-control" name="state" readonly id="state" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-lg-9 col-lg-offset-3">
                                            <button type="button" class="btn btn-primary"  onclick=" window.history.go(-1);" data-loading-text="加载中...">返回</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>
        <!--page-wrapper--->

    </div>
</div>
<!--回到顶部--->
<a id="backTop">
    <i class="fa fa-angle-up"></i>
</a>




<!-- 配置文件 -->
<!--<script type="text/javascript" src="../plugins/ueditor/ueditor.config.js"></script>-->
<!-- 编辑器源码文件 -->
<!--<script type="text/javascript" src="../plugins/ueditor/ueditor.all.js"></script>-->
<!-- 实例化编辑器 -->
<!--<script type="text/javascript">
    var ue = UE.getEditor('container', {
        autoHeightEnabled: true,
        autoFloatEnabled: true,
        initialFrameWidth:'100%',
        initialFrameHeight:'500'
    });
</script>-->
<script src="../lib/jquery/jquery.min.js" type="text/javascript"></script>
<script src="../lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../plugins/validator/js/bootstrapValidator.min.js"></script>
<script type="text/javascript" src="../js/sweetalert-dev.js"></script>
<script src="../js/desc.js"></script>
<script type="text/javascript" src="../js/public.js"></script>
<script src="../plugins/validator/js/bootstrap-datetimepicker.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../plugins/validator/js/bootstrap-datetimepicker.zh-CN.js" type="text/javascript" charset="utf-8"></script>

<script>


    // 获取url中的参数
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) {
            return unescape(r[2]);
        } else {
            return null;
        }
    }

    $(function () {
        //获取url中的targetId参数
        var id = getUrlParam('id');
        if (id != null) {
            findById();
        }

        // 查询信息
        function findById() {
            $('#id').val(id);
            $.ajax({
                url: website + "/UserController/findByIdTwo",
                type: "POST",
                data: {'userId': id},
                success: function (data) {
                    console.log(data);
                    $("#userName").val(data.data.user1.userName);
                    $("#account").val(data.data.user1.account);
                    $("#sex").val(data.data.user1.sex);
                    if(data.data.user1.sex==1){
                        $("#sex").val("男");
                    }else if(data.data.user1.sex==2){
                        $("#sex").val("女");
                    }else{
                        $("#sex").val("");
                    }
                    $("#balance").val(data.data.user1.balance);

                    $("#commission").val(data.data.user1.commission);
                    $("#country").val(data.data.user1.country);
                    $("#province").val(data.data.user1.province);
                    $("#city").val(data.data.user1.city);
                    $("#invitationCode").val(data.data.user1.invitationCode);
                    $("#member").val(data.data.user1.member);
                    $("#mallGrade").val(data.data.user1.mallGrade);
                    $("#time").val(data.data.user1.time);
                    $("#state").val(data.data.user1.state);

                    if(data.data.user1.state==0){
                        $("#state").val('删除');
                    }else if(data.data.user1.state==1){
                        $("#state").val('正常');
                    }
                    console.log(data);
                    if(data.data.user2.userName=="" || data.data.user2.userName==null){
                        $("#userName1").val('');
                    }else {
                        $("#userName1").val(data.data.user2.userName);
                    }
                    $("#account1").val(data.data.user2.account);

                },
            });
        }
    });



    $("#fat-btn").click(function () {
        var courierNumber = $("#courierNumber").val();
        var deliveryStatus = $("#deliveryStatus").val();

        var typeset = $("#orderStatus").val();

        if(courierNumber !=='' && typeset=='未付款'){
            swal({
                title: '该订单状态为未付款，不能添加快递单号',
                type: "error"
            }, function() {
            });
        }else if (courierNumber == "" && deliveryStatus == "") {
            swal({
                title: '您未进行任何操作',
                type: "error"
            }, function() {
            });
        }else if(courierNumber=='' && deliveryStatus!=''){
            deliveryStatus1(deliveryStatus,1)
        } else if(deliveryStatus=='' && courierNumber!=''){
            addExpressNumber(courierNumber,1);
        }else if(courierNumber!=='' && deliveryStatus!==''){
            deliveryStatus1(deliveryStatus,0);
            addExpressNumber(courierNumber,0);
        }
    });




    /*// 修改商品发货状态
    function deliveryStatus1(deliveryStatus,index) {
        $("#fat-btn").button('loading');
        var id = $("#id").val();

        $.ajax({
            url: website+"/OrderController/addShipmentStatus",
            type: "post",
            data: {
                id: id,
                deliveryStatus: deliveryStatus
            },
            success: function (data) {
                $("#fat-btn").button('reset');

                if (data.code == 200) {
                    //提交动作
                    if(index==1){
                        swal({
                            title: data.msg,
                            type: "success"
                        }, function() {
                           window.location.href = "order.html";
                        });
                    }

                } else {
                    swal({
                        title: data.msg,
                        type: "error"
                    }, function() {
                        window.location.href = "order.html";
                    });
                }


            }
        })
    }




    // 添加快递单号
    function addExpressNumber(courierNumber,index) {
        $("#fat-btn").button('loading');
        var id = $("#id").val();

        $.ajax({
            url: website+"/OrderController/addExpressNumber",
            type: "post",
            data: {
                id: id,
                courierNumber: courierNumber
            },
            success: function (data) {
                $("#fat-btn").button('reset');

                if (data.code == 200) {
                    //提交动作
                    swal({
                        title: data.msg,
                        type: "success"
                    }, function() {
                       window.location.href = "order.html";
                    });
                }else {
                    swal({
                        title: data.msg,
                        type: "error"
                    }, function() {
                        window.location.href = "order.html";
                    });
                }


            }
        })
    }*/



</script>

</body>

</html>